/**
 * 
 */
package com.xb.rmi.client.test;

import java.rmi.RemoteException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.xb.rmi.client.IHello;

/**
 * @author kexue
 *
 */
public class ClientMain {

	private static Logger logger = LoggerFactory.getLogger(ClientMain.class);
	public static void main(String [] args) throws RemoteException{
		
		ApplicationContext applicationContext=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
		IHello hello =null ; //初始化连接
		logger.info("开始初始化bean");
		hello = (IHello) applicationContext.getBean("clientRmiTest");
		//clientRmiTest

		logger.info("开始调用");
		String say = hello.say("你好");
		logger.info("结束调用" + say);
		
	} 
}
